package net.melon.sysres.inst.struts2;

import javax.inject.Inject;

import net.esj.basic.core.engine.util.logging.Logger;
import net.esj.basic.core.engine.util.logging.LoggerFactory;
import net.esj.basic.exception.MelonException;
import net.esj.basic.exception.MelonRuntimeException;
import net.esj.basic.plugins.struts2.Immit;
import net.esj.basic.utils.view.BaseJsonMessage.MessageLevel;
import net.melon.sysres.manager.SystemManager;
import net.melon.sysres.pojo.SysProperty;
import net.melon.sysres.pojo.SysUserRule;

public class UserRuleAction extends AbstractSysresAction<SysUserRule, SysUserRule> {

	private SystemManager systemManager;
	
	@Override
	public void doAdd() throws MelonException {
		systemManager.saveUserRule(entity);
	}

	@Override
	public void doDelete() {
		systemManager.deleteUserRule(entity);
	}



	@Override
	public void doUpdate(){
		systemManager.updateUserRule(entity);
	}



	public SysUserRule getEntity() {
		return entity;
	}

	public void setEntity(SysUserRule entity) {
		this.entity = entity;
	}

	@Inject
	public void setSystemManager(SystemManager systemManager) {
		this.systemManager = systemManager;
	}

}
